package com.cyy.springbootinit.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cyy.springbootinit.model.dto.systemnotifiaction.SystemNotificationQueryRequest;
import com.cyy.springbootinit.model.entity.SystemNotification;
import com.cyy.springbootinit.model.vo.SystemNotificationVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 系统通知表服务
 *
 * @author 程序员cyy</a>
 * @from cyy</a>
 */
public interface SystemNotificationService extends IService<SystemNotification> {

    /**
     * 校验数据
     *
     * @param systemNotification
     * @param add 对创建的数据进行校验
     */
    void validSystemNotification(SystemNotification systemNotification, boolean add);

    /**
     * 获取查询条件
     *
     * @param systemNotificationQueryRequest
     * @return
     */
    QueryWrapper<SystemNotification> getQueryWrapper(SystemNotificationQueryRequest systemNotificationQueryRequest);
    
    /**
     * 获取系统通知表封装
     *
     * @param systemNotification
     * @param request
     * @return
     */
    SystemNotificationVO getSystemNotificationVO(SystemNotification systemNotification, HttpServletRequest request);

    /**
     * 分页获取系统通知表封装
     *
     * @param systemNotificationPage
     * @param request
     * @return
     */
    Page<SystemNotificationVO> getSystemNotificationVOPage(Page<SystemNotification> systemNotificationPage, HttpServletRequest request);
}
